function [path] = choose_path(startpath)
% present user with a list of directories underneath the startpath
% and allow them to choose one (or none).
% The return value is null if no paths are chosen;
% otherwise it is the chosen path.
%

global pathdone
global selpath

selpath = [];
pathdone = 0;

choosepath('init', startpath);

while(pathdone == 0)
   pause(0.01);
end;

path = selpath;
